<html>
<head>
<style>
div {text-align:center;
width:500px;}
</style>
</head>

<body>
<div>This is a div</div>
</body>
</html>